package com.xh.audit.vo.webform;

import com.mybatisflex.core.query.QueryWrapper;
import com.xh.audit.entity.project.ProjectLaborDivision;
import lombok.Data;
import lombok.EqualsAndHashCode;

import static com.xh.audit.entity.project.table.ProjectLaborDivisionTableDef.PROJECT_LABOR_DIVISION;

@Data
@EqualsAndHashCode(callSuper = true)
public class ProjectLaborDivisionQuery extends PageParams<ProjectLaborDivision> {

    private Integer projectId;
    private Integer projectRole;
    private Integer auditUsersId;


    public QueryWrapper queryWrapperBuild() {
        QueryWrapper queryWrapper = QueryWrapper.create()
            
                .and(PROJECT_LABOR_DIVISION.PROJECT_ID.eq(projectId))
                .and(PROJECT_LABOR_DIVISION.PROJECT_ROLE.eq(projectRole))
                .and(PROJECT_LABOR_DIVISION.AUDIT_USERS_ID.eq(auditUsersId));
        return queryWrapper;
    }
}
